package com.File_io_.io_.writer_;

import java.io.FileOutputStream;
import java.io.OutputStreamWriter;

/**
 * @author 宋鑫宇
 * @version 1.0
 * 演示 用 FileOutputStreamWriter 将转成 OutputStreamWriter 指定编码
 */
public class OutputStreamWriter_ {
    public static void main(String[] args) throws Exception{
        OutputStreamWriter osw = new OutputStreamWriter(new FileOutputStream("D:\\idea_WorkSpace\\myjava\\myjava\\src\\com\\File_io_\\date\\hello1.txt"), "gbk");
        osw.write("风雨过后，彩虹将至");
        osw.close();

    }
}
